Due to a change in the content consumption trend and the increase of high-capacity content such as high definition (HD) content and ultra-high definition (UHD) content, data congestion becomes severe over a network in communication systems. As a result, content transmitted by a signal transmitter (for example, host A) does not normally arrive at a signal receiver (for example, host B), and all or part of the transmitted content is lost on a route.
In general, data is transmitted in packets and thus data loss occurs in units of a transmission packet. Therefore, once a transmission packet is lost over a network, the signal receiver fails to receive the lost transmission packet and thus does not know data included in the lost transmission packet, thereby causing various types of user inconveniences including audio quality degradation, video quality degradation, screen tearing, subtitle omission, and file loss.
To recover data lost over a network, repair symbols generated by forward error correction (FEC) coding may be added to a source block including a predetermined number of packets and then transmitted. In general, the size (or length) of data (that is, source payload) included in a packet may be fixed or variable. That is, the source payload may have a fixed or variable packet size. For example, although a moving picture experts group 2 (MPEG2) transport stream (TS) has a fixed packet size of 188 bytes, including a 4-byte header and 184-byte payload, a real-time transport protocol (RTP) packet or an MPEG media transport (MMT) packet does not always have a fixed size.
Accordingly, if a variable packet size is used, the signal transmitter may generate a source block by adding padding data to data in order to make the sizes of actually transmitted packets equal, and then perform FEC coding on the generated source block.
However, in the case where a source block is generated by adding padding data to data and then FEC-encoded as described above, when an FEC decoder recovers a packet lost over a network (channel) during FEC decoding, the FEC decoder recovers the source block (that is, the source block including packet data). In this context, to recover actual transmission packets, the FEC decoder needs to accurately determine the size of the packets before data is padded with padding data.